Important Things to Note in the Sample Code
You should note the following in
MakeActionSpriteMovie.c
sample code:
-
There are event types other than mouse-related events (for example,
Idle
and
frameLoaded
).
-
Idle events are independent of the movie's rate, and can be gated, so they are sent at most every
n
ticks. (The second penguin moves when the movie's rate is 0, and moves only once per second because of the value of the sprite tracks
idleEventFrequency
property.)
-
Multiple actions may be executed in response to a single event (for example, rolling over the first penguin shows and hides four different buttons).
-
Actions may target any sprite or track in the movie (for example, clicking on one penguin changes the graphics mode of the other).
-
Conditional and looping control structures are supported. (The second penguin uses the "case statement" action.)
-
Sprite track variables that have not been set have a default value of 0. (The second penguin's conditional code relies on this.)
© 1998 Apple Computer, Inc.| Previous | Chapter Contents | Chapter Top | Next |